<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
	</body>
	<script type="text/javascript">
//		密码(以字母开头，长度在6~18之间，只能包含字母、数字和下划线)：^[a-zA-Z]\w{5,17}$
		
		var reg = /^[a-zA-Z]\w{5,17}$/;
		var str = "z123456";
		console.log(reg.test(str))
		
	</script>
</html>
